/// <BaseRespR<T> 返回 status code msg data Response.
class Result<T> {
  int code;
  bool success;
  String message;
  T data;

  Result( this.message, this.data,this.code,this.success);

  Result.fromJson(Map<String, dynamic> json)
      : code = json['code'],
        message = json['message'],
        success = json['success'],
        data = json['data'];

  @override
  String toString() {
    StringBuffer sb = StringBuffer('{');
    sb.write(",\"code\":$code");
    sb.write(",\"msg\":\"$message\"");
    sb.write(",\"data\":\"$data\"");
    sb.write(",\"success\":\"$success\"");

    sb.write('}');
    return sb.toString();
  }
}
